function defaultValue(value) {
  return function (target, propertyKey) {
    let val = value
    const getter = () => {
      return val
    }
    const setter = (newValue) => {
      val = newValue
    }
    Object.defineProperty(target, propertyKey, {
      enumerable: true,
      configurable: true,
      get: getter,
      set: setter,
    })
  }
}
class Settings {
  @defaultValue('dark')
  theme
  @defaultValue(30)
  timeout
}
const settings = new Settings()
console.log(settings.theme)
console.log(settings.timeout)
